package com.zoweunion.mechanic.dao.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Mapper
@Component
public interface AuthDao {

	
	
	/**
	 * 查询总数
	 */
	int countBycondition(Map<String, Object> reqMap);
	
	
	/**
	 * 分页+条件查询
	 */
	List<Map<String,Object>>pageQuery(Map<String, Object> reqMap);

	/**
	 * 新增授权
	 * @param reqMap
	 * @return
	 */
	int insertAuth(Map<String, Object> reqMap);


	/**
	 * 更新授权  包括禁用 删除 恢复
	 * @param reqMap
	 */
	int update(Map<String, Object> reqMap);


	/**
	 * 根据uid查询授权
	 * @param reqMap
	 * @return
	 */
	Map<String, Object> getAuthByUid(Map<String, Object> reqMap);


	/**
	 * 新建授权操作日志
	 * @param authLogMap
	 * @return
	 */
	int addAuthLog(Map<String, Object> authLogMap);


	String selectUserId(Map<String, Object> reqMap);


	String getAuthRoleByUseraccount(@Param("user_account") String user_account);


	int updateUserRemainingSum(Map<String, Object> reqMap);

	/**
	 * 根据UserAccount查询授权
	 * @param reqMap
	 * @return
	 */
	Map<String, Object> getAuthByUserAccount(Map<String, Object> reqMap);
}
